# coding: utf-8
# author: ZhenbPeng
#   date: 2017/10/17 14:08

DEBUG = True
REDIS_HOST = 'localhost'
REDIS_PORT = 6379
REDIS_PWD = ''
THREAD_NUM = 1
WORKER_NUMS = 1
IP_USE_TIMES = 10
PROXYPOOL_LENGTH = 1000

UA = [
    'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Mobile Safari/537.36'
    'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1',
    'Mozilla/5.0 (Linux; U; Android 4.4.4; en-US; XT1022 Build/KXC21.5-40) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.7.0.636 U3/0.8.0 Mobile Safari/534.30',
    'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.9 NetType/WIFI Language/zh_CN',
]

# 日志配置
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'verbose': {
            'format': '%(asctime)s %(levelname)s %(filename)s <%(funcName)s>%(lineno)d %(message)s'
        },
        'simple': {
            'format': '%(levelname)s %(message)s'
        },
    },
    'handlers': {
        # 'default': {
        #     'class': 'logging.handlers.RotatingFileHandler',
        #     'maxBytes': 1024 * 1024 * 200,  # 5 MB
        #     'backupCount': 3,
        #     'formatter': 'verbose',
        #     'filename': '/tmp/gogo.log'
        # },
        'console': {
            'class': 'logging.StreamHandler',
            'formatter': 'verbose',
        },
    },
    'loggers': {
        'default': {
            'handlers': ['console'],
            'formatter': 'verbose',
            'level': 'DEBUG',
        },
        'worker': {
            'handlers': ['console'],
            'formatter': 'verbose',
            'level': 'DEBUG',
        },
    },
}